package com.fortune.dto.in.cUserMgt;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotEmpty;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fortune.common.spring.jackson.deserializer.LogableEnumDeserializer;
import com.fortune.constants.enums.LogableEnum;

import io.swagger.annotations.ApiModelProperty;

public class CUserLogableDto {
	@NotEmpty(message="用户id不能为空")
	@ApiModelProperty(required=true, example="员工id")
	private String userId;
	@NotNull(message="logable 参数请传入FORBID或者ALLOW")
	@ApiModelProperty(required=true, example="FORBID 禁止登录;ALLOW 允许登录",allowableValues= "FORBID,ALLOW",dataType="string")
	@JsonDeserialize(using=LogableEnumDeserializer.class)
	private LogableEnum logable;
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public LogableEnum getLogable() {
		return logable;
	}
	public void setLogable(LogableEnum logable) {
		this.logable = logable;
	}
	@Override
	public String toString() {
		return "LogableDto [userId=" + userId + ", logable=" + logable + "]";
	}
}
